<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增课程')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-course-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">课程名：</label>
                <div class="col-sm-8">
                    <input name="courseName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">课程信息：</label>
                <div class="col-sm-8">
                    <input name="courseInfo" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">专业：</label>
                <div class="col-xs-4">
                    <select id="professionId" name="professionId" class="form-control">
                        <option th:each="profession:${professions}" th:value="${profession.id}" th:text="${profession.professionName}" ></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "teacher/course"
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-course-add').serialize());
            }
        }
        $("input[name='brithday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>